package com.ssy.jt808.gateway.adapter;

import com.ssy.jt808.gateway.adapter.model.APIResult;
import com.ssy.jt808.gateway.application.endpoint.MessageManager;
import com.ssy.jt808.gateway.domain.protocol.T0600;
import com.ssy.jt808.gateway.domain.protocol.T9600;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;

/**
 * @author zeno
 */
@RestController
@RequestMapping("/v1/terminals/messages")
public class SpecialMessageController{

  @Autowired
  private MessageManager messageManager;

  @Operation(summary="9600 语音文件设置")
  @PostMapping("9600")
  public Mono<APIResult<T0600>> T8103( @RequestBody T9600 request ){
    return messageManager.requestR(request, T0600.class);
  }
}
